package cn.hy;


import cn.hy.domain.Order;
import cn.hy.repository.OrderRepository;
import com.sun.org.apache.xpath.internal.operations.Or;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;
import java.util.List;

/**
 * https://start.spring.io/
 * mybatis  自动装配
 *    MybatisAutoConfiguration
 *
 *  mybatis 逆向工程
 *
 *  druid 数据源
 *  DruidDataSourceAutoConfigure
 *  监控页面:  @link http://localhost:8080/druid/index.html
 *
 *  分页
 *   1、 pageHelper
 *   2、 插件之分页机制
 *
 */
@SpringBootApplication
public class App implements CommandLineRunner {
    public static void main(String[] args) {
        SpringApplication.run(App.class,args);
    }

    @Resource
    OrderRepository userRepository;

    @Override
    public void run(String... args) throws Exception {
        List<Order> page = userRepository.page();
        System.out.println(page);

    }
}